package com.xh.bussiness.teachbook.constant;

/**
 * <p>
 *
 * </p>
 *
 * @author Pitt zhang
 * @since 2019/12/28
 */
public enum BookContentTypeEnum {
    //1.错题;2.变试题;3.普通试题;4.考点分析;5.文本/段落;6.思维导图;7.练习;8.自编试题;9:相似题
    ERROQUESTION(1, "已识别错题"),
    VARIABLEQUESTION(2, "变试题"),
    QUESTION(3, "例题"),
    EXAMPOINT(4, "考点分析"),
    TEXT(5, "※"),
    THINKMAP(6, "思维导图"),
    PRACTICE(7, "练习"),
    MADEQUESTION(8, "自编试题"),
    LIKENESS(9, "相似题");

    private Integer contentType;
    private String contentTypeName;

    // 构造方法
    BookContentTypeEnum(Integer contentType, String contentTypeName) {
        this.contentType = contentType;
        this.contentTypeName = contentTypeName;
    }

    // 普通方法
    public static String getName(Integer contentType) {
        for (BookContentTypeEnum c : BookContentTypeEnum.values()) {
            if (c.getContentType() == contentType) {
                return c.contentTypeName;
            }
        }
        return null;
    }

    public Integer getContentType() {
        return contentType;
    }

    public void setContentType(Integer contentType) {
        this.contentType = contentType;
    }

    public String getContentTypeName() {
        return contentTypeName;
    }

    public void setContentTypeName(String contentTypeName) {
        this.contentTypeName = contentTypeName;
    }
}
